Dynomotion

Group: DynoMotion Message: 13910 From: Moray Cuthill Date: 10/16/2016
Subject: FRO/SSO implementation Encoder v. Potentiometer
One thing I'd like to add to my new milling machine, are physical feed rate, and spindle speed override dials, however I'm trying to decide on the best option, and would like to know how others have implemented them.


I'll be using a Kanalog, so I have encoder and analogue inputs available.

From what I can think of, encoders are the better option.
They can be reset in software - no sudden jump like you could potentially have when enabling analogue pots, but how would I handle when they should be reset? Reset to 100% when disabled, or when a new feedrate is called?

Shouldn't be affected by any noise in the wiring - using the available +/-15V I'd have to use a reasonably high value pot, so any noise could cause fluctuations, especially considering the wiring would have to run from the control panel, and about 2-3 metres into the control cabinet beside various power carrying wiring.

Any thoughts/suggestions welcome.

Thanks,
Moray
Group: DynoMotion Message: 13913 From: Tom Kerekes Date: 10/17/2016
Subject: Re: FRO/SSO implementation Encoder v. Potentiometer

Hi Moray,

No great thoughts. 

But manually moving the Pots is relatively slow so you might add big Caps at the Kanalog Inputs so I doubt if noise would then be a big problem.

Regards

TK


On 10/16/2016 12:09 PM, Moray Cuthill moray.cuthill@... [DynoMotion] wrote:
 
One thing I'd like to add to my new milling machine, are physical feed rate, and spindle speed override dials, however I'm trying to decide on the best option, and would like to know how others have implemented them.


I'll be using a Kanalog, so I have encoder and analogue inputs available.

From what I can think of, encoders are the better option.
They can be reset in software - no sudden jump like you could potentially have when enabling analogue pots, but how would I handle when they should be reset? Reset to 100% when disabled, or when a new feedrate is called?

Shouldn't be affected by any noise in the wiring - using the available +/-15V I'd have to use a reasonably high value pot, so any noise could cause fluctuations, especially considering the wiring would have to run from the control panel, and about 2-3 metres into the control cabinet beside various power carrying wiring.

Any thoughts/suggestions welcome.

Thanks,
Moray

Group: DynoMotion Message: 13921 From: mmurray70@hotmail.com Date: 10/21/2016
Subject: Re: FRO/SSO implementation Encoder v. Potentiometer
From an operator point of view its nice to be able to relate a knob position with a rate. For example if you want to slow rapid down to 50% and you know thats 12:00 position (or however you set it up) every time with a pot without having to look at screen or anything. I used pots with mine and am happy with it. 

Come to think about it I dont think rapid override display changes in kmotioncnc (feed and spindle override do) so might be alot simpler to just use pots. probably more likely to run out of encoder inputs before analog inputs too, although you still should have plenty for most normal setups. 
Group: DynoMotion Message: 13923 From: kn6za Date: 10/21/2016
Subject: Re: FRO/SSO implementation Encoder v. Potentiometer
I use pots for my fro and sso controls and it works great. No problem with noise and I did not need any other components.

I initially did not like the fact that I had to look at the control to get it back to center 100% I did not get pots with a physical detent so I created a dead band in software to create an adjustable width on the knob that corresponded to exactly 100%. You can tailor this width to your liking. 

I can pretty much keep my head in the machine and place the knob back at center without looking now.

Hope this helps, code is attached.

Andrew

for (;;)
{

T = WaitNextTimeSlice();
Tfro = T;
// assume 10V range where 5V is nominal FRO
Potfro=KANALOG_CONVERT_ADC_TO_VOLTS(ADC(0)) - 4.0;
FRO = Potfro*0.25 + .6;
// assume 10V range where 5V is nominal FRO
Pot=KANALOG_CONVERT_ADC_TO_VOLTS(ADC(1)) - 4.5;
SRO = Pot*0.25 + .65;
// send message to KMotionCNC if the pot changed significantly
// and it has been a while since the last message
if ((SRO > LastSRO+CHANGE_TOL || SRO < LastSRO-CHANGE_TOL) && 
T > LastSROTime+CHANGE_TIME)
{
if (SRO>.7 && SRO<1.) SRO1=1;
else
{
if (SRO<.7) SRO1 = SRO+.3;
else
{
SRO1=SRO;
}
}
if (SRO1<0) SRO1 = 0.01;
DoPCFloat(PC_COMM_SET_SSO,SRO1);
float speed = *(float *)&persist.UserData[KMVAR];
if ((speed * FACTOR ) >444444.3) speed = 10000;
printf("speed = %f\n",speed);
printf("SRO = %f\n",SRO1);
if (ReadBit(47) == 1 && SRO1 == .01) Jog(3,0);
else
{
Jog(3,speed * FACTOR * -1);
   }
if (ReadBit(46) == 1 && SRO1 == .01) Jog(3,0);
else
{
Jog(3,speed * FACTOR );
   }

LastSRO=SRO;
LastSROTime=T;
}
// send message to KMotionCNC if the pot changed significantly
// and it has been a while since the last message
if ((FRO > LastFRO+CHANGE_TOL || FRO < LastFRO-CHANGE_TOL) && 
Tfro > LastFROTime+CHANGE_TIME)
{
if (FRO>.7 && FRO<1.) FRO1=1;
else
{
if (FRO<.7) FRO1 = FRO+.3;
else
{
FRO1=FRO;
}
}
DoPCFloat(PC_COMM_SET_FRO,FRO1);

LastFRO=FRO;
LastFROTime=Tfro;
}
}

Group: DynoMotion Message: 13924 From: Dan W Date: 10/21/2016
Subject: Re: FRO/SSO implementation Encoder v. Potentiometer
Instead of using pots you could use lets say an 8 position switch and wire it with resistors around the outside.  Let's say 1k ohm resistors wired in series wire off of the common terminal and the last terminal you will get fixed positions for your switch and you will have 8 different voltages (0 ohms through the 7k ohms in 1k ohm increments). 

Dan



Sent via the Samsung Galaxy S®6 active, an AT&T 4G LTE smartphone


Group: DynoMotion Message: 13928 From: Moray Cuthill Date: 10/22/2016
Subject: Re: FRO/SSO implementation Encoder v. Potentiometer
Thanks for the replies.

The being able to see where the dial is set, is something I hadn't thought about, and certainly makes a convincing case for using pots.
Andrew, thanks for the code. I had already thought about adding a programmable deadband (the main reason I like KFlop's is the ability to program pretty much however you want), but your code will save me from some head scratching.

For those who've used pots, do you know what resistance value you used?
Of the top of my head, I had been thinking 100k pots, but perhaps that might be a bit too high.

Thanks,
Moray

On Sat, Oct 22, 2016 at 2:52 AM, Dan W engnerdan@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Instead of using pots you could use lets say an 8 position switch and wire it with resistors around the outside.  Let's say 1k ohm resistors wired in series wire off of the common terminal and the last terminal you will get fixed positions for your switch and you will have 8 different voltages (0 ohms through the 7k ohms in 1k ohm increments). 

Dan



Sent via the Samsung Galaxy S®6 active, an AT&T 4G LTE smartphone


Group: DynoMotion Message: 13929 From: kn6za Date: 10/23/2016
Subject: Re: FRO/SSO implementation Encoder v. Potentiometer
Glad to help Moray,

   I have 2 machines and one machine has 5k and the other 10k. The only real difference with a high a resistance pot will be the impedance. The impedance on the kanalog 0-10v analog input is 100k ohm, so even at 100k I would think it would work just fine, but I have not tested one that high for noise immunity.